import mongoose from "mongoose";

const approveCharactersSchema = new mongoose.Schema(
  {
    userId: {
      type: mongoose.Schema.Types.ObjectId,
      required: true,
      ref: "User",
    }, // User集合的id
    name: { type: String, required: true }, // 名称
    title: { type: String, required: true }, // 标题
    desc: { type: String, required: true }, // 简介
    avatar: {
      type: String,
      default:
        "https://gitee.com/tx-feng/FengHuaWuQue/raw/Vue/Static/player/avatar/avatar11.avif",
    }, // 头像链接
    rightText: { type: String }, // 简介2
    bgVideo: { type: String }, // 背景视频链接
    leftImg: { type: String }, // 图片链接
    frameImg: { type: String }, // 头像框图片链接
    videoRight: { type: String }, // 视频链接2
    status: {
      type: String,
      enum: ["已通过", "待审批", "未通过"],
      default: "待审批",
    }, // 审批状态
    remark: { type: String }, // 审批说明
  },
  { collection: "ApproveCharacters" }
);

const ApproveCharacters = mongoose.model(
  "ApproveCharacters",
  approveCharactersSchema
);

export default ApproveCharacters;
